3.901 \(\int \frac{-2+7 x}{42-16 x+2 x^2} \, dx\)

Optimal. Leaf size=33 \[ \frac{7}{4} \log \left (x^2-8 x+21\right )-\frac{13 \tan ^{-1}\left (\frac{4-x}{\sqrt{5}}\right )}{\sqrt{5}} \]

[Out]

(-13*ArcTan[(4 - x)/Sqrt[5]])/Sqrt[5] + (7*Log[21 - 8*x + x^2])/4

_______________________________________________________________________________________

Rubi [A]  time = 0.0445784, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222 \[ \frac{7}{4} \log \left (x^2-8 x+21\right )-\frac{13 \tan ^{-1}\left (\frac{4-x}{\sqrt{5}}\right )}{\sqrt{5}} \]

Antiderivative was successfully verified.

[In]  Int[(-2 + 7*x)/(42 - 16*x + 2*x^2),x]

[Out]

(-13*ArcTan[(4 - x)/Sqrt[5]])/Sqrt[5] + (7*Log[21 - 8*x + x^2])/4

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 6.20976, size = 36, normalized size = 1.09 \[ \frac{7 \log{\left (2 x^{2} - 16 x + 42 \right )}}{4} + \frac{13 \sqrt{5} \operatorname{atan}{\left (\sqrt{5} \left (\frac{x}{5} - \frac{4}{5}\right ) \right )}}{5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((-2+7*x)/(2*x**2-16*x+42),x)

[Out]

7*log(2*x**2 - 16*x + 42)/4 + 13*sqrt(5)*atan(sqrt(5)*(x/5 - 4/5))/5

_______________________________________________________________________________________

Mathematica [A]  time = 0.0203154, size = 35, normalized size = 1.06 \[ \frac{1}{2} \left (\frac{7}{2} \log \left (x^2-8 x+21\right )+\frac{26 \tan ^{-1}\left (\frac{x-4}{\sqrt{5}}\right )}{\sqrt{5}}\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(-2 + 7*x)/(42 - 16*x + 2*x^2),x]

[Out]

((26*ArcTan[(-4 + x)/Sqrt[5]])/Sqrt[5] + (7*Log[21 - 8*x + x^2])/2)/2

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 29, normalized size = 0.9 \[{\frac{7\,\ln \left ({x}^{2}-8\,x+21 \right ) }{4}}+{\frac{13\,\sqrt{5}}{5}\arctan \left ({\frac{ \left ( 2\,x-8 \right ) \sqrt{5}}{10}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((-2+7*x)/(2*x^2-16*x+42),x)

[Out]

7/4*ln(x^2-8*x+21)+13/5*5^(1/2)*arctan(1/10*(2*x-8)*5^(1/2))

_______________________________________________________________________________________

Maxima [A]  time = 0.766753, size = 35, normalized size = 1.06 \[ \frac{13}{5} \, \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5}{\left (x - 4\right )}\right ) + \frac{7}{4} \, \log \left (x^{2} - 8 \, x + 21\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*(7*x - 2)/(x^2 - 8*x + 21),x, algorithm="maxima")

[Out]

13/5*sqrt(5)*arctan(1/5*sqrt(5)*(x - 4)) + 7/4*log(x^2 - 8*x + 21)

_______________________________________________________________________________________

Fricas [A]  time = 0.270567, size = 42, normalized size = 1.27 \[ \frac{1}{20} \, \sqrt{5}{\left (7 \, \sqrt{5} \log \left (x^{2} - 8 \, x + 21\right ) + 52 \, \arctan \left (\frac{1}{5} \, \sqrt{5}{\left (x - 4\right )}\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*(7*x - 2)/(x^2 - 8*x + 21),x, algorithm="fricas")

[Out]

1/20*sqrt(5)*(7*sqrt(5)*log(x^2 - 8*x + 21) + 52*arctan(1/5*sqrt(5)*(x - 4)))

_______________________________________________________________________________________

Sympy [A]  time = 0.252927, size = 39, normalized size = 1.18 \[ \frac{7 \log{\left (x^{2} - 8 x + 21 \right )}}{4} + \frac{13 \sqrt{5} \operatorname{atan}{\left (\frac{\sqrt{5} x}{5} - \frac{4 \sqrt{5}}{5} \right )}}{5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((-2+7*x)/(2*x**2-16*x+42),x)

[Out]

7*log(x**2 - 8*x + 21)/4 + 13*sqrt(5)*atan(sqrt(5)*x/5 - 4*sqrt(5)/5)/5

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.273285, size = 35, normalized size = 1.06 \[ \frac{13}{5} \, \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5}{\left (x - 4\right )}\right ) + \frac{7}{4} \,{\rm ln}\left (x^{2} - 8 \, x + 21\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/2*(7*x - 2)/(x^2 - 8*x + 21),x, algorithm="giac")

[Out]

13/5*sqrt(5)*arctan(1/5*sqrt(5)*(x - 4)) + 7/4*ln(x^2 - 8*x + 21)